pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    let mut a = 0u32;
    let mut b = 1u32;
    let mut sum = 0u32;

    while b <= threshold {
        if b % 2 == 1 {
            sum += b;
        }
        let temp = a;
        a = b;
        b += temp;
    }

    sum as u32
}   
